Fixed enable preview event field value for Gradle and Standalone projects#452
Merged
sid-srini merged 5 commits intooracle:mainfrom Aug 26, 2025
Merged
Fixed enable preview event field value for Gradle and Standalone projects#452sid-srini merged 5 commits intooracle:mainfrom
sid-srini merged 5 commits intooracle:mainfrom
Conversation
…rect for the standalone projects
1. For gradle projects, the CompilerOptionsQuery provides the required compiler arguments for a Source file/folder, not the project root. Thus, fixed the public LspServerTelemetryManager.isPreviewEnabled() methods to query the source roots of the current gradle project and sub-projects in order to check for the existence of the enable-preview compiler argument. 2. Fixed LspServerTelemetryManger.getProjectType() to return "gradle" only when the project name contains "gradle". For other kinds of netbeans projects, not maven/gradle, the returned value is null. This avoids wrong metrics collected for unsupported project types, such as ant, openjdk, make etc.
…-and-type Fixed nb-telemetry isPreviewEnabled for gradle projects
sid-srini
approved these changes
Aug 25, 2025
Member
There was a problem hiding this comment.
Thanks a lot @Achal1607 for the fixes, and, applying the gradle fix for other projects like maven too. LGTM 👍
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Standalone issue:
There was a race condition, the Netbeans LS requested for run config options from the client but was not waiting for the response. It sent the response before the future completes, due to which it always returned
false.Gradle issue fixed by @sid-srini :